import logging

def configure(name):
    l = logging.getLogger(name)
    l.setLevel(logging.DEBUG)

    f = logging.FileHandler(name + '.log')
    f.setLevel(logging.DEBUG)

    c = logging.StreamHandler()
    c.setLevel(logging.DEBUG)

    fmt = logging.Formatter('%(asctime)s::%(name)s::%(levelname)s::%(message)s')
    f.setFormatter(fmt)
    c.setFormatter(fmt)
    l.addHandler(f)
    l.addHandler(c)
    return l

def get(name): return logging.getLogger(name)
